/**
 * 跨域设置
 */
const cross = (req, res, next) => { 
  res.setHeader('Access-Control-Allow-Origin', '*')
  res.setHeader('Access-Control-Allow-Methods', 'GET, POST, DELETE, PUT, PATCH, OPTIONS')
  res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With, Current-Page')
  res.setHeader('Content-Type', 'application/json;charset=utf-8')
  next()
}

module.exports = cross